<template>
    <div class="login_container">
        <div class="login_form">
            <div class="login_header">
                <img src="@/assets/vite.svg" alt="">
                <div class="company">LOGO IN</div>
            </div>
            <div class="login_main">
                <div class="item">
                    <input type="text" placeholder="USERNAME" autocomplete="off" v-model="formData.username" />
                </div>
                <div class="item">
                    <input type="password" placeholder="PASSWORD" autocomplete="new-password" v-model="formData.username" />
                </div>
                <div class="item">
                    <button @click="login">LOG IN</button>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
export default {
    data:()=>{
        return {
            formData:{
                username:"",
                password:""
            }
        }
    },
    methods:{
        login(){
            console.log(this.formData);
            // 处理一些登录的业务
        }
    }
}
</script>
<style scoped>
.login_container{
    position: relative;
    height: 100%;
    background: url("@/assets/images/bg_login.jpg") no-repeat;
    background-size: cover;
}
.login_container .login_form{
    background-color: #fff;
    width: 340px;
    height: 400px;
    border-radius: 6px;
    position: absolute;
    right: 260px;
    top: 50%;
    transform: translateY(-50%);
}
.login_container .login_header{
    text-align: center;
    padding: 30px 0;
}

.login_container .company{
    color: #555555;
}

.login_main{
    margin:0 20px;
}

.login_main .item{
    margin-bottom: 20px;
}

.login_main .item input{
    border:0px;
    border-bottom: 1px solid #e1e1e1;
    width: 100%;
    height: 40px;
    outline:0;
}

.login_main .item input:focus{
    border-color: #2076ff;
}

.login_main .item input::placeholder{
    color: #999999;
}

button{
    background-color: #2076ff;
    color: #ffffff;
    height: 36px;
    cursor: pointer;
    border: 0px;
    width: 100%;
    margin-top: 20px;
    border-radius: 5px;
}
button:hover{
    opacity: 0.9;
}

input::-webkit-input-placeholder{ /*WebKit browsers*/
    color: #999999;
}

input::-moz-input-placeholder{ /*Mozilla Firefox*/
    color: #999999;
}

input::-ms-input-placeholder{ /*Internet Explorer*/ 
    color: #999999;
}

</style>